package com.probiz.estore.system.service;

import java.util.Date;

import com.probiz.estore.common.model.system.AppUser;
import com.probiz.estore.core.service.GenericManager;

/**
 * Manager interface for AppUser, responsible for business processing, and communicate between web and persistence layer.
 *
 */
public interface AppUserManager<T extends AppUser> extends GenericManager<T> {
	
	public void saveModifyPassword(String email, String newPassword);
	
	public void saveModifyPassword(Integer appuserId, String newPassword);
	
	public boolean getIsUserExist(String username);
	
	public boolean getIsEmailExist(String email);
	
	public boolean getIsEmailUseByOthers(String email, Integer myAppuserId);
	
	public T getUserByName(String username);
	
	public boolean getIsPasswordRight(Integer appuserId,String oldPassword);
	
	public void updateRolesByAppuserId(String roleIdList, Integer appuserId);
	
	public void saveLastLoginTimeByAppuserId(Integer appuserId, Date lastLoginTime);
	
}
